<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">物流方管理</h1>
</div>
<div class="wrapper-sm" ng-controller="logisticsManagentController">
    <div class="panel panel-default">
        <div class="panel-heading font-bold">查询</div>
        <div class="panel-body">
            <label class="control-label pull-left m-t-xs">名称</label>
            <div class="col-md-2 form-group">
                <input type="text" class="form-control input-sm"  ng-model="queryTerms.name" placeholder="请输入物流方名称" id="fa-searchz">
            </div>
            <label class="control-label pull-left m-t-xs">地址</label>
            <tms-address class="col-lg-6" province="queryTerms.provinceCode" city="queryTerms.cityCode" area="queryTerms.areaCode" city-list="CityList_log" area-list="AreaList_log" required="true" ischecked="false">
            </tms-address>

            <button ng-click="query()" class="btn btn-sm btn-default btn-addon" ng-class="{'disabled':querying}" ng-disabled="querying" id="query">
                <i class="fa fa-search" ng-show="!querying"></i>
                <i class="fa fa-spinner no-bordr" ng-show="querying" ng-class="{'fa-spin':querying}"></i>
                <span ng-show="!querying">查询</span>
                <span ng-show="querying">查询中...</span>
            </button>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            物流方列表
        </div>
        <div class="table-responsive">
            <div ui-grid="gridOptions" ui-grid-pagination ui-grid-auto-resize ui-grid-resize-columns style="height:{{heightA}}px; min-height:395px; overflow:hidden; min-width:1000px;">
                <div class="watermark" ng-if="!gridOptions.data.length">暂无数据</div>
            </div>
        </div>
        <div class="panel-body">
            <button class="pull-right-xs btn btn-sm m-b-xs btn-info btn-addon " ng-click="addLogistics()" data-toggle="modal" data-target="#myModal" id="add"><i class="fa fa-plus"></i>添加</button>
        </div>
    </div>

    <!-- Modal -->
    <div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">{{title}}</h4>
                </div>
                <form class="form-horizontal form-validation" id="logisticsForm" novalidate>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-lg-4 control-label">名称<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control" ng-model="detail.name" placeholder="请填写名称" name="nameBox" required id="nameBox">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">地址<span class="text-danger">*</span></label>
                            <div class="col-lg-6">
                                <div class="form-inline required">
                                    <tms-address province="detail.provinceCode" city="detail.cityCode" area="detail.areaCode" city-list="CityList_logbox" area-list="AreaList_logbox" ischecked="ischecked">
                                    </tms-address>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">手机号码<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="tel" class="form-control" ng-model="detail.phoneNumber" placeholder="请填写手机号" name="phoneNumberBox" required id="phoneNumberBox" ng-pattern="/^\d{11,12}$/">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">详细地址<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="text" class="form-control" ng-model="detail.address" placeholder="请填写详细地址" name="addressBox" required id="addressBox">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">管理员账号<span class="text-danger" ng-show="show">*</span></label>
                            <div class="col-lg-4">
                                <input type="text" ng-disabled="disable" class="form-control" ng-model="detail.adminName" placeholder="请填写管理员账号" name="adminNameBox" required id="adminNameBox">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">管理员密码<span class="text-danger" ng-show="show">*</span></label>
                            <div class="col-lg-4">
                                <input type="password" class="form-control"  ng-model="detail.adminPassword" placeholder="请填写管理员密码" name="adminPasswordBox" required id="adminPasswordBox">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">重置管理员密码<span class="text-danger">*</span></label>
                            <div class="col-lg-4">
                                <input type="password" class="form-control"  ng-model="detail.reAdminPassword" placeholder="请再次填写管理员密码" name="reAdminPasswordBox" required id="reAdminPasswordBox">

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-4 control-label">是否启用</label>
                            <div class="col-lg-4">
                                <label class="checkbox i-checks">
                                    <input type="checkbox" class="" ng-model="detail.isEnabled" name="IsEnabled" id="isEnabled"><i></i> 启用
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal" id="cancel">取消</button>
                        <button type="button" class="btn btn-primary" ng-click="detail.click()" id="save">保存</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>